package com.roadjava.rbac.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
public class LikedScheduler {

    @Autowired
    private LikedService likedService;

    // 每小时执行一次
    @Scheduled(fixedRate = 300000)
    public void saveLikedToDB() {
        likedService.saveLikedToDB();
    }
}
